From: Ian Campbell Date: Mon, 21 Jan 2013 12:40:28 +0000 (+0000) Subject: device-tree: get_val cannot cope with cells > 2, add early_panic X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7394 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=313140cbb12019660e435dfbb4f2886df269830c;p=xen.git device-tree: get_val cannot cope with cells > 2, add early_panic Signed-off-by: Ian Campbell Acked-by: Tim Deegan Committed-by: Ian Campbell --- diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 8b4ef2f45c..260c2d4862 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -84,6 +84,9 @@ static void __init get_val(const u32 **cell, u32 cells, u64 *val) { *val = 0; + if ( cells > 2 ) + early_panic("dtb value contains > 2 cells\n"); + while ( cells-- ) { *val <<= 32;